<template>
    <div class="info-container">
        <router-link :to="{name:'InfoDetail',
            params:{id:item.tId,status:item.tStatus}}" v-for="item in talentArr" :key="item.id">
            
            <TalentItem :tName="item.tName" :tSex="item.tSex" :tHeight="item.tHeight"
            :tEducation="item.tStudy" :tPhone="item.tPhone" :tFirstDate="item.tFirstDate" :tAge="item.tAge" :tJob="item.tJob" :tSalary="item.tSalary"
            :tImg="item.tImg">
            </TalentItem>
            
        </router-link>
        
    </div>
</template>

<script>
//引入组件TalentItem
import TalentItem from "@/components/Talent/TalentItem.vue";

export default {
    name:"Employed",
        data() {
        return {
            talentArr:[
                // {
                //     tId:4,
                //     tName:"张三",
                //     tSex:"女",
                //     tHeight:"172cm",
                //     tEducation:"大专",
                //     tPhone:"13578901234",
                //     tFirstDate:"1993-10-28",
                //     tAge:"29",
                //     tJob:"人事",
                //     tSalary:"3000",
                //     tSrc:"../../../assets/talent-icon/touxiang.webp"
                // },
                // {
                //     tId:5,
                //     tName:"小李",
                //     tSex:"男",
                //     tHeight:"172cm",
                //     tEducation:"大专",
                //     tPhone:"13578901234",
                //     tFirstDate:"1993-10-28",
                //     tAge:"29",
                //     tJob:"人事",
                //     tSalary:"3000",
                //     tSrc:"assets/touxiang.webp"
                // },
                // {
                //     tId:6,
                //     tName:"小王",
                //     tSex:"男",
                //     tHeight:"172cm",
                //     tEducation:"大专",
                //     tPhone:"13578901234",
                //     tFirstDate:"1993-10-28",
                //     tAge:"29",
                //     tJob:"人事",
                //     tSalary:"7000",
                //     tSrc:"../assets/touxiang.webp"
                // }
            ]
        }
    },
    components: {
        TalentItem,
    },
    mounted() {
        this.getUnreadInfo()
    },
    methods: {
        getUnreadInfo(){
            this.$axios({
                methods:"get",
                url:"http://132.232.110.185/personnelManagement/talents/listStatus?like=已入职",
            })
            .then(
                (res)=>{
                    console.log(res);
                    console.log(res.data.data);
                    this.talentArr = res.data.data
                },
                (err)=>{}
            )
        }
    },
}
</script>

<style scoped>
    .info-container{
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-around;
        background-color: rgb(243,243,244);
        padding-top: 20px;
        width:100%;
        padding-bottom: 30px;
        /* height:680px; */
    }
    a{
        text-decoration: none;
        color: black;
    }
</style>